package org.jeecg.modules.mr.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.exception.JeecgBootException;
import org.jeecg.modules.mr.entity.MrRecords;
import org.jeecg.modules.mr.vo.ChangesRecordVo;
import org.jeecg.modules.mr.vo.MrBookReadsVO;
import org.jeecg.modules.mr.vo.MrIndexDataVO;
import org.jeecg.modules.mr.vo.ReadRecordVo;

import java.text.ParseException;
import java.util.List;
import java.util.Map;

/**
 * @Description: 抄表记录
 * @Author: jeecg-boot
 * @Date:   2022-02-03
 * @Version: V1.0
 */
public interface IMrRecordsService extends IService<MrRecords> {

    /**抄表保存*/
    Result<?> readManual(ReadRecordVo recordVo);
    /**抄表删除*/
    public Result<?> readDelManual(ReadRecordVo recordVo);

    /**
     * 远程抄表
     * @param manholeVal 远程表序列号-字段值
     * @return
     */
    List<Map<String, Object>> readRemote(String manholeVal);


    /**
     * 查询 水表户是否已抄表审核
     *
     * @param cusId
     * @return
     */
    Boolean queryCusIsReaded( String cusId,String id);

    /**审核
     * @return*/
    Result<Object> auditsBatch(List<String> asList, Integer isPass , String note) throws JeecgBootException, ParseException;

    //online 创建记录
    public void createOnlineData(String code, JSONObject jsonObject);

    /**修改水量*/
    public  Result<?> changesAmount(ChangesRecordVo changesRecordVo);

    /**
     * 查询抄表记录计量信息
     * @param rdIds
     * @return
     */
    public List<ReadRecordVo>queryReadMeasureRecord(List<String>rdIds);

    /**查询待审抄表记录*/
    public List<MrRecords>queryPendingRecords(MrRecords query);

    /**查询可以水量修改的抄表记录*/
    public List<MrRecords>queryChangeRecords(MrRecords query);

    /**查询本月已抄水量*/
    public List<MrIndexDataVO>queryMrIndexDataAccount();

    /**查询本月已审数据*/
   public List<MrIndexDataVO>queryMrIndexDataAudit();

    /**查询本月已审数据*/
   public List<MrBookReadsVO>queryBookReadCount(MrRecords query);


    /**
     * 手动远传抄表
     * @param recordVo
     * @return
     */
    Result<?> readRemoteManual(ReadRecordVo recordVo);
}
